package org.example.redisdemo.mapper;

import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.example.redisdemo.model.Test;
import org.example.redisdemo.model.TestExample;

public interface TestMapper {
    long countByExample(TestExample example);

    int deleteByExample(TestExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Test record);

    int insertSelective(Test record);

    List<Test> selectByExample(TestExample example);

    @Select("SELECT * FROM test WHERE id = #{value}")
    Test getById(@Param("value") int value);
    @Update("update test set name = #{value.name,jdbcType=VARCHAR} where id = #{value.id,jdbcType=INTEGER}")
    void updateById(@Param("value") Test value);

    Test selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Test record, @Param("example") TestExample example);

    int updateByExample(@Param("record") Test record, @Param("example") TestExample example);

    int updateByPrimaryKeySelective(Test record);

    int updateByPrimaryKey(Test record);
}